package com.ruoyi.production.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.production.mapper.ErpWorkOrderMapper;
import com.ruoyi.production.domain.ErpWorkOrder;
import com.ruoyi.production.service.IErpWorkOrderService;

/**
 * 工单管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-17
 */
@Service
public class ErpWorkOrderServiceImpl implements IErpWorkOrderService 
{
    @Autowired
    private ErpWorkOrderMapper erpWorkOrderMapper;

    /**
     * 查询工单管理
     * 
     * @param orderId 工单管理主键
     * @return 工单管理
     */
    @Override
    public ErpWorkOrder selectErpWorkOrderByOrderId(Long orderId)
    {
        return erpWorkOrderMapper.selectErpWorkOrderByOrderId(orderId);
    }

    /**
     * 查询工单管理列表
     * 
     * @param erpWorkOrder 工单管理
     * @return 工单管理
     */
    @Override
    public List<ErpWorkOrder> selectErpWorkOrderList(ErpWorkOrder erpWorkOrder)
    {
        return erpWorkOrderMapper.selectErpWorkOrderList(erpWorkOrder);
    }

    /**
     * 新增工单管理
     * 
     * @param erpWorkOrder 工单管理
     * @return 结果
     */
    @Override
    public int insertErpWorkOrder(ErpWorkOrder erpWorkOrder)
    {
        return erpWorkOrderMapper.insertErpWorkOrder(erpWorkOrder);
    }

    /**
     * 修改工单管理
     * 
     * @param erpWorkOrder 工单管理
     * @return 结果
     */
    @Override
    public int updateErpWorkOrder(ErpWorkOrder erpWorkOrder)
    {
        return erpWorkOrderMapper.updateErpWorkOrder(erpWorkOrder);
    }

    /**
     * 批量删除工单管理
     * 
     * @param orderIds 需要删除的工单管理主键
     * @return 结果
     */
    @Override
    public int deleteErpWorkOrderByOrderIds(Long[] orderIds)
    {
        return erpWorkOrderMapper.deleteErpWorkOrderByOrderIds(orderIds);
    }

    /**
     * 删除工单管理信息
     * 
     * @param orderId 工单管理主键
     * @return 结果
     */
    @Override
    public int deleteErpWorkOrderByOrderId(Long orderId)
    {
        return erpWorkOrderMapper.deleteErpWorkOrderByOrderId(orderId);
    }
}
